home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / include / Epsilon.h < prev    next >
Encoding:
C/C++ Source or Header  |  2006-01-09  |  1.9 KB  |  88 lines

  1. #ifndef EPSILON_H
  2. #define EPSILON_H
  3.  
  4. #define EPSILON_FAIL 0
  5. #define EPSILON_OK 1
  6.  
  7. typedef void Epsilon_Exif_Info;
  8.  
  9. #define EPSILON_ED_CAM    0x02    /* Camera-specific info. */
  10. #define EPSILON_ED_IMG    0x04    /* Image-specific info. */
  11.  
  12. struct _Epsilon
  13. {
  14.   char *hash;
  15.   char *src;
  16.   char *thumb;
  17.   char *key;
  18.   int w, h;
  19.   int tw, th;
  20. };
  21. typedef struct _Epsilon Epsilon;
  22.  
  23. struct _Epsilon_Info
  24. {
  25.   char *uri;
  26.   unsigned long long int mtime;
  27.   int w, h;
  28.   char *mimetype;
  29.   Epsilon_Exif_Info *eei;
  30. };
  31. typedef struct _Epsilon_Info Epsilon_Info;
  32.  
  33. enum _Epsilon_Thumb_Size
  34. {
  35.    EPSILON_THUMB_NORMAL,
  36.    EPSILON_THUMB_LARGE
  37. };
  38.  
  39. typedef enum _Epsilon_Thumb_Size Epsilon_Thumb_Size;
  40.  
  41. void epsilon_init (void);
  42.  
  43. /* construct destruct */
  44. void epsilon_free (Epsilon * e);
  45. Epsilon *epsilon_new (const char *file);
  46.  
  47. /* Set the part name as key (Edje for now)*/
  48. void epsilon_key_set (Epsilon * e, const char *key);
  49. /* Set the resolution*/
  50. void epsilon_resolution_set (Epsilon * e, int w, int h);
  51.  
  52. /*
  53.  * the source filename
  54.  */
  55. const char *epsilon_file_get (Epsilon * e);
  56. /*
  57.  * the thumbnail filename
  58.  */
  59. const char *epsilon_thumb_file_get (Epsilon * e);
  60. /* 
  61.  * returns EPSILON_FAIL if no thumbnail exists, EPSILON_OK if it does
  62.  */
  63. int epsilon_exists (Epsilon * e);
  64. /* 
  65.  * returns EPSILON_FAIL if no errors, EPSILON_OK if write goes ok
  66.  */
  67. int epsilon_generate (Epsilon * e);
  68. /*
  69.  * set output thumb size
  70.  */
  71. void epsilon_thumb_size(Epsilon *e, Epsilon_Thumb_Size size);
  72.  
  73. /*
  74.  * get the meta information associated with the epsilon
  75.  */
  76. Epsilon_Info *epsilon_info_get (Epsilon * e);
  77. void epsilon_info_free (Epsilon_Info * ei);
  78.  
  79. int epsilon_info_exif_props_as_int_get (Epsilon_Info * ei, unsigned short lvl,
  80.                     long prop);
  81. const char *epsilon_info_exif_props_as_string_get (Epsilon_Info * ei,
  82.                         unsigned short lvl,
  83.                         long prop);
  84. void epsilon_info_exif_props_print (Epsilon_Info * ei);
  85. int epsilon_info_exif_get (Epsilon_Info * ei);
  86.  
  87. #endif
  88.